home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
Bandit.pxl
< prev
next >
Wrap
Text File
|
2000-12-23
|
4KB
|
159 lines
Initialize:
SetColorPalette(GENERATE)
WinGetActive(Win$)
UseCoordinates(PIXEL)
UseBackGround(TRANSPARENT,192,192,192)
DrawBackGround
WaitInput(100) {let NT and 95 catch up}
WinLocate(Win$,100,100,520,360,Res)
Title$ = "Slot Machine Example"
WinTitle(Win$, Title$)
InfoMenu(REMOVE)
WaitInput(100)
SetMenu("Exit!",Leave,
ENDPOPUP,
"Play",Test,
ENDPOPUP)
Button(100,150,200,180,PUSH,"Play",Test)
WinGetClientRect("",cx1,cy1,cx2,cy2)
DrawShadeRectangle(cx1,cy1,cx2,cy2, 0,0,0, 0,0,255, TOPBOTTOM)
GoSub DrawSlotWindows
Wait_for_Input:
WaitInput()
Leave:
End
Test:
ix1 = 20
ix2 = 120
ix3 = 220
ix4 = 320
iy1 = 10
GoSub DrawSlotWindows
GoSub Spin
ix1 = 20
Random(14,Result)
GoSub StopSpin
ix1 = 120
Random(14,Result)
GoSub StopSpin
ix1 = 220
Random(14,Result)
GoSub StopSpin
ix1 = 320
Random(14,Result)
GoSub StopSpin
Goto Wait_for_Input
{======================================================================}
Spin:
SpinNumber = 5
While SpinNumber <> 0
DrawIcon(ix1,iy1,64,64,ICON01)
DrawIcon(ix2,iy1,64,64,ICON02)
DrawIcon(ix3,iy1,64,64,ICON03)
DrawIcon(ix4,iy1,64,64,ICON04)
DrawIcon(ix1,iy1,64,64,ICON05)
DrawIcon(ix2,iy1,64,64,ICON06)
DrawIcon(ix3,iy1,64,64,ICON07)
DrawIcon(ix4,iy1,64,64,ICON08)
DrawIcon(ix1,iy1,64,64,ICON09)
DrawIcon(ix2,iy1,64,64,ICON10)
DrawIcon(ix3,iy1,64,64,ICON11)
DrawIcon(ix4,iy1,64,64,ICON12)
DrawIcon(ix1,iy1,64,64,ICON13)
DrawIcon(ix2,iy1,64,64,ICON14)
WaitInput(1)
DrawIcon(ix3,iy1,64,64,ICON01)
DrawIcon(ix4,iy1,64,64,ICON02)
DrawIcon(ix1,iy1,64,64,ICON03)
DrawIcon(ix2,iy1,64,64,ICON04)
DrawIcon(ix3,iy1,64,64,ICON05)
DrawIcon(ix4,iy1,64,64,ICON06)
DrawIcon(ix1,iy1,64,64,ICON07)
DrawIcon(ix2,iy1,64,64,ICON08)
DrawIcon(ix3,iy1,64,64,ICON09)
DrawIcon(ix4,iy1,64,64,ICON10)
DrawIcon(ix1,iy1,64,64,ICON11)
DrawIcon(ix2,iy1,64,64,ICON12)
DrawIcon(ix3,iy1,64,64,ICON13)
DrawIcon(ix4,iy1,64,64,ICON14)
DrawIcon(ix1,iy1,64,64,ICON01)
DrawIcon(ix2,iy1,64,64,ICON02)
DrawIcon(ix3,iy1,64,64,ICON03)
DrawIcon(ix4,iy1,64,64,ICON04)
DrawIcon(ix1,iy1,64,64,ICON05)
DrawIcon(ix2,iy1,64,64,ICON06)
DrawIcon(ix3,iy1,64,64,ICON07)
DrawIcon(ix4,iy1,64,64,ICON08)
DrawIcon(ix1,iy1,64,64,ICON09)
DrawIcon(ix2,iy1,64,64,ICON10)
DrawIcon(ix3,iy1,64,64,ICON11)
DrawIcon(ix4,iy1,64,64,ICON12)
DrawIcon(ix1,iy1,64,64,ICON13)
DrawIcon(ix2,iy1,64,64,ICON14)
DrawIcon(ix3,iy1,64,64,ICON01)
DrawIcon(ix4,iy1,64,64,ICON02)
DrawIcon(ix1,iy1,64,64,ICON03)
DrawIcon(ix2,iy1,64,64,ICON04)
DrawIcon(ix3,iy1,64,64,ICON05)
DrawIcon(ix4,iy1,64,64,ICON06)
DrawIcon(ix1,iy1,64,64,ICON07)
DrawIcon(ix2,iy1,64,64,ICON08)
DrawIcon(ix3,iy1,64,64,ICON09)
DrawIcon(ix4,iy1,64,64,ICON10)
DrawIcon(ix1,iy1,64,64,ICON11)
DrawIcon(ix2,iy1,64,64,ICON12)
DrawIcon(ix3,iy1,64,64,ICON13)
DrawIcon(ix4,iy1,64,64,ICON14)
SpinNumber--
WaitInput(1)
EndWhile
Return
StopSpin:
If Result = 1 Then DrawIcon(ix1,iy1,64,64,ICON01)
If Result = 2 Then DrawIcon(ix1,iy1,64,64,ICON02)
If Result = 3 Then DrawIcon(ix1,iy1,64,64,ICON03)
If Result = 4 Then DrawIcon(ix1,iy1,64,64,ICON04)
If Result = 5 Then DrawIcon(ix1,iy1,64,64,ICON05)
If Result = 6 Then DrawIcon(ix1,iy1,64,64,ICON06)
If Result = 7 Then DrawIcon(ix1,iy1,64,64,ICON07)
If Result = 8 Then DrawIcon(ix1,iy1,64,64,ICON08)
If Result = 9 Then DrawIcon(ix1,iy1,64,64,ICON09)
If Result = 10 Then DrawIcon(ix1,iy1,64,64,ICON10)
If Result = 11 Then DrawIcon(ix1,iy1,64,64,ICON11)
If Result = 12 Then DrawIcon(ix1,iy1,64,64,ICON12)
If Result = 13 Then DrawIcon(ix1,iy1,64,64,ICON13)
If Result = 14 Then DrawIcon(ix1,iy1,64,64,ICON14)
Return
DrawSlotWindows:
UsePen(SOLID,1,0,255,255)
UseBrush(SOLID,255,255,255)
DrawRectangle( 20,10, 84,74)
DrawRectangle(120,10,184,74)
DrawRectangle(220,10,284,74)
DrawRectangle(320,10,384,74)
UseFont("Arial",7,15,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(20,90,"Odds of all the same icons are 38,416 : 1")
DrawText(20,105,"Odds of three icons the same are 2,955 : 1")
DrawText(20,120,"Odds of two icons the same are 227 : 1")
Return